﻿@using BugChang.DES.Web.Mvc.Models.Common
@model BugChang.DES.Application.Letters.Dtos.ReceiveLetterEditDto

@section css
    {

    <link href="~/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
}
<div class="row">
    <div class="col-xs-6">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">收信登记</h3>
            </div>
            <div class="box-body">
                <div class="modal-body">
                    <form id="LetterReceiveForm" method="post" asp-controller="Letter" asp-action="Receive">
                        <input type="hidden" asp-for="SendDepartmentId" value="0" />
                        <div class="form-group">
                            <label>原条码号</label>
                            <input type="text" class="form-control" asp-for="OldBarcodeNo" value="">
                        </div>
                        <div class="form-group">
                            <label>市机码</label>
                            <input type="text" class="form-control" asp-for="ShiJiCode" />
                        </div>
                        <div class="form-group">
                            <label>原发单位</label>
                            <input type="text" class="form-control" asp-for="OldSendDepartmentName" value="">
                        </div>
                        <div class="form-group text-left">
                            <label>收件单位</label>
                            <button id="btnReceiveDepartment" type="button" class="btn btn-default btn-block" data-toggle="modal" data-target="#ReceiveSelectModal" style="text-align: left">请选择收件单位...</button>
                            <input type="hidden" asp-for="ReceiveDepartmentId" value="" />
                        </div>
                        <div class="form-group text-left">
                            <label>收件人</label>
                            <input type="text" class="form-control" asp-for="Receiver" value="" />
                        </div>
                        <div class="form-group">
                            <label>密级</label>
                            <select class="form-control" asp-for="SecretLevel">
                                <option value="0">无</option>
                                <option value="1">秘密</option>
                                <option value="2">机密</option>
                                <option value="3">绝密</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>紧急程度</label>
                            <select class="form-control" asp-for="UrgencyLevel">
                                <option value="0">无</option>
                                <option value="1">紧急</option>
                                <option value="2">特急</option>
                                <option value="3">限时</option>
                            </select>
                        </div>
                        <div class="form-group hide" id="divUrgencyTime">
                            <label>限时时间</label>
                            <input type="text" class="form-control" asp-for="UrgencyTime" value="" />
                        </div>
                        <div class="form-group">
                            <label>附加数据</label>
                            <textarea asp-for="CustomData" class="form-control" placeholder="可自由记录附加信息，如文号等..." rows="3"></textarea>
                        </div>
                        <div class="form-group text-right">
                            <button id="btnPrintBarcode" type="button" class="btn btn-primary"><i class="fa  fa-barcode"></i> 打印条码</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-6">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">今日登记记录</h3>
            </div>
            <div class="box-body">
                <div class="modal-body">
                    <div class="table-responsive">
                        <table id="table" class="table table-bordered table-hover text-nowrap"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="ReceiveSelectModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            @Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel("选择收件单位"))
            <div class="modal-body">
                <div class="row">
                    <div class="col-xs-4" style="border-right:1px solid #e5e5e5;">
                        <ul class="ztree" id="groupTree"></ul>
                    </div>
                    <div class="col-xs-8">
                        <ul class="ztree" id="groupDetailTree"></ul>
                    </div>
                </div>
            </div>
            @Html.Partial("~/Views/Shared/Modals/_ModalFooterWithClose.cshtml")
        </div>
    </div>
</div>

@section scripts
    {
    <script src="~/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script src="~/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script src="~/js/LodopFuncs.js"></script>
    <script src="~/views-resource/letter/receive.js" asp-append-version="true"></script>
}